import { request } from '@/utils/request'

// 获取商家列表
export function getShopList(data) {
  return request('/m/merchant/list', 'POST', data)
}

// 获取商家详情
export function getShopDetail(merchantId) {
  return request('/m/merchant/get', 'POST', { merchantId })
}

// 获取商家基本信息（发票用）
export function getShopSimpleDetail(merchantId) {
  return request('/m/merchant/get/simple', 'POST', { merchantId })
}

// 获取商家美食详情
export function getShopFoodDetail(foodId) {
  return request('/m/merchant/food/get', 'POST', { foodId })
}

// 申请发票
export function applyInvoice(data) {
  return request('/m/merchant/fapiao/apply', 'POST', data)
}

// 点赞商家
export function dianzanShop(merchantId) {
  return request('/merchant/dianzan', 'POST', { merchantId })
}

// 喜欢商家
export function xihuanShop(merchantId) {
  return request('/merchant/xihuan', 'POST', { merchantId })
}

// 收藏商家
export function shoucangShop(merchantId) {
  return request('/merchant/shoucang', 'POST', { merchantId })
}

// 点赞美食
export function dianzanFood(foodId) {
  return request('/merchant/food/dianzan', 'POST', { foodId })
}

// 喜欢美食
export function xihuanFood(foodId) {
  return request('/merchant/food/xihuan', 'POST', { foodId })
}

// 收藏美食
export function shoucangFood(foodId) {
  return request('/merchant/food/shoucang', 'POST', { foodId })
}
